//
//  LearningCell.m
//  HotWord
//
//  Created by Ji Qi on 12-6-9.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "LearningCell.h"
#import "Word.h"
#import "Meaning.h"

@implementation LearningCell

@synthesize cellView;
@synthesize textLabel;
@synthesize word;
@synthesize category;


/*

- (void)setSentenceForCell:(Word *)_word atIndexPath:(NSIndexPath *)indexPath
{
    self.word = _word;
    Meaning *meaning = [_word.meanings objectAtIndex:indexPath.section];
    NSString *sentence = [meaning.sentences objectAtIndex:indexPath.row];
    
    self.textLabel.text = sentence;
}

- (void)setSynForCell:(Word *)_word atIndexPath:(NSIndexPath *)indexPath
{
    self.word = _word;
    Meaning *meaning = [_word.meanings objectAtIndex:indexPath.section];
    NSString *syn = [meaning.synonyms objectAtIndex:indexPath.row];
    
    self.textLabel.text = syn;
}

- (void)setAntForCell:(Word *)_word atIndexPath:(NSIndexPath *)indexPath
{
    self.word = _word;
    Meaning *meaning = [_word.meanings objectAtIndex:indexPath.section];
    NSString *ant = [meaning.antonyms objectAtIndex:indexPath.row];
    
    self.textLabel.text = ant;
}
  */



- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

- (NSString *)reuseIdentifier
{
    return @"LearningCell";
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (void)dealloc{
    [cellView release];
    [textLabel release];
    [word release];
    [super dealloc];
}

@end
